home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Larry Magid's Essential Internet
/
Larry Magid's Essential Internet (Quarterdeck Corporation)(1995).ISO
/
qsockpro.qip
/
MAUINET.MPS
< prev
next >
Wrap
Text File
|
1995-10-09
|
2KB
|
68 lines
# Maui Global Communications PPP and SLIP login script
# Copyright 1995 Quarterdeck Corporation
# 5-9-95 BPD
#define the variables we will need
STRING username
STRING password
STRING framing
STRING IPAddress
# uncomment for debugging
# TRACE ON
# reset maximum login timeout.
SetTimeout 90
# Get username from access method
# if the Username field is empty, abort.
CfgGetValue "Username" username
IF result = 0 THEN
ABORT "ERROR: cannot load username from Qdeck.ini."
ENDIF
# get password from access method
# if the Password field is empty, abort.
CfgGetValue "Password" password
IF result = 0 THEN
ABORT "ERROR: cannot load username from Qdeck.ini."
ENDIF
# get framing layer (MPPPP, MPSLIP)
# abort with an error if we can't read the Framing setting
CfgGetValue "Framing" framing
IF result = 0 THEN
ABORT "Can't read 'Framing' setting from qdeck.ini"
ENDIF
CommWaitFor "login:" # wait for login prompt
# The character before the user name indicates the type of connection.
IF framing = "MPPPP" THEN
CommSend "P"
ENDIF
IF framing = "MPSLIP" THEN
CommSend "S"
ENDIF
CommSend username # send user name
CommSend "%r" # send carriage return
CommWaitFor "Password:" # wait for password prompt
CommSend password # send password
CommSend "%r" # send carriage return
IF framing = "MPSLIP" THEN
CommWaitFor "to "
CommReadIPAddr IPAddress
IF result>0 THEN
CfgSetValue "IPAddress" IPAddress
PRINT "%rIP Address set to ["; IPAddress; "]"
ENDIF
ENDIF
END # indicate success if we got this far